package com.ruoyi.health.report.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.gson.Gson;
import com.ruoyi.health.report.domain.zkxc.ZkxcPushBaseEntity;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author ChenYF
 * @date 2025-09-04 16:59
 */
@Data
public class HealthAnalysisVO {
    /**
     * 主键id == 上传的三方id
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 用户id
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long customerId;

    /**
     * 请求时间
     */
    private Date reqTime;

    /**
     * 报告详情
     */
    private ZkxcPushBaseEntity baseEntity;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long healthReportId;

    /**
     * pdf文件列表
     */
    private List<String> pdfFileUrlList;

    public void setPdfFileUrlList(String pdfFileUrl) {
        if (pdfFileUrl != null) {
            this.pdfFileUrlList = new Gson().fromJson(pdfFileUrl, List.class);
        } else {
            this.pdfFileUrlList = new ArrayList<>();
        }
    }

}
